#导包
from rest_framework import serializers
#导入数据库类
from myapp.models import User,Goods,Category

#声明序列化对象
class UserSer(serializers.ModelSerializer):

    #声明字段
    class Meta:
        model = User
        fields = "__all__"


class GoodsSer(serializers.ModelSerializer):

    #声明字段
    class Meta:
        model = Goods
        fields = "__all__"


class CategorySer(serializers.ModelSerializer):

    #声明字段
    class Meta:
        model = Category
        fields = "__all__"